package nl.science.uva.pico.compiler.stacklanguage;

/**
 * Simple counter to generate instruction labels
 * 
 * @author Ivo van Dongen, Karel Pieterson
 *
 * @version 1.0 
 */

class LabelCounter {
	private Integer labelCounter = 0;
	
	/**
	 * @return the next instruction label on the counter (increments the counter)
	 */
	public int getNext() {
		labelCounter++;
		return labelCounter;
	}
	
	/**
	 * @return the current (already used) instruction label on the counter (no side effects)
	 */
	public int getCurrent() {
		return labelCounter;
	}
}